package com.erqi.pojo;

import com.erqi.mapper.master.UserPlcMapper;
import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author king
 * @Date 2020/7/15 09:02
 * @Version 1.0
 */

@Component
@ToString
@Data
public class Message {

    @Autowired
    UserPlcMapper mapper;

    public static   List<String> msgList=new ArrayList<>();


   /* //第一条线的开方机与一体机
    private   String OneKUser = mapper.selectByType("1k").getName();
    private   String OneTUser = mapper.selectByType("1t").getName();
    //第二条线的开方机与一体机
    private   String TwoKUser = mapper.selectByType("1t").getName();
    private   String TwoTUser = mapper.selectByType("1t").getName();
    //第三条线的开方机与一体机
    private   String ThreeKUser = mapper.selectByType("3k").getName();
    private   String ThreeTUser = mapper.selectByType("3t").getName();
    //第四条线的开方机与一体机
    private   String FourKUser = mapper.selectByType("4k").getName();
    private   String FourTUser = mapper.selectByType("4t").getName();*/
 //第一条线的开方机与一体机
    private   String OneKUser;
    private   String OneTUser;
    //第二条线的开方机与一体机
    private   String TwoKUser;
    private   String TwoTUser;
    //第三条线的开方机与一体机
    private   String ThreeKUser;
    private   String ThreeTUser;
    //第四条线的开方机与一体机
    private   String FourKUser;
    private   String FourTUser;

    private String Monitor;
    public void ini() {
        OneKUser = mapper.selectByType("1k").getName();
        OneTUser = mapper.selectByType("1t").getName();
        TwoKUser = mapper.selectByType("2k").getName();
        TwoTUser = mapper.selectByType("2t").getName();
        ThreeKUser = mapper.selectByType("3k").getName();
        ThreeTUser = mapper.selectByType("3t").getName();
        FourKUser = mapper.selectByType("4k").getName();
        FourTUser = mapper.selectByType("4t").getName();
        Monitor = mapper.selectByType("Monitor").getName();
    }
}
